__author__ = 'Fernando'

from PyQt4.QtCore import *
from PyQt4.QtGui import *
import UsBocadillo

class PrincipalBocadillo(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)
        self.ventana = UsBocadillo.Ui_UsBocadillo()
        self.ventana.setupUi(self)
        self.connect(self.ventana.calcular, SIGNAL("clicked()"), self.fcalcular)
        self.connect(self.ventana.Borra, SIGNAL("clicked()"), self.bBorrar)
        self.connect(self.ventana.Cajadia, SIGNAL("clicked()"), self.cCajadia)

    def fcalcular(self):
        self.ventana.Total.display(
            self.ventana.NBocadillo.value()*1.50 +\
            self.ventana.NRefresco.value()*1.20 +\
            self.ventana.NCerveza.value()*1.00)

    def bBorrar(self):
        print "lolo"
    def cCajadia(self):
        print "lolo"


if __name__ == "__main__":
    import sys
    app = QApplication(sys.argv)
    interfaz = PrincipalBocadillo()
    interfaz.show()
    sys.exit(app.exec_())

